using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Infrastructure.Interface
{
    /// <summary>
    /// 分页信息  
    /// <remarks></remarks>
    /// </summary>
    /// <typeparam name="T">实体类型</typeparam>
    public abstract class PageBase<T>
    {
        /// <summary>
        /// 获取所有条目
        /// </summary>
        public int TotalCount { get; protected set; }

        /// <summary>
        /// 获取分页数据
        /// </summary>      
        public List<T> EntityArray { get; protected set; }

        /// <summary>
        /// 转换为兼容Easy-UI表格的Json字符串
        /// </summary>
        /// <returns></returns>
        public abstract string ToEasyUiJson();

        /// <summary>
        /// 转换为兼容Easy-UI表格的Json字符串
        /// </summary>
        /// <param name="dataFormat">时间格式</param>
        /// <returns></returns>
        public abstract string ToEasyUiJson(string dataFormat);

        /// <summary>
        /// 转换为兼容Mini-UI表格的Json字符串
        /// </summary>
        /// <returns></returns>
        public abstract string ToMiniUiJson();

        /// <summary>
        /// 转换为兼容Mini-UI表格的Json字符串
        /// </summary>
        /// <param name="dataFormat">时间格式</param>
        /// <returns></returns>
        public abstract string ToMiniUiJson(string dataFormat);
    }
}
